//
//  XLNetWorkingHandle.m
//  WebSocketTest
//
//  Created by tanqilong on 17/3/29.
//  Copyright © 2017年 tanqilong. All rights reserved.
//

#import "XLNetWorkingHandle.h"

@interface XLNetWorkingHandle ()
@property (nonatomic,strong) NSMutableArray * objPool; //正在进行网络请求的对象池
@end

@implementation XLNetWorkingHandle

static XLNetWorkingHandle * handle;

+(XLNetWorkingHandle *)shareInstance {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        handle = [XLNetWorkingHandle new];
        
    });
    return handle;
}

-(instancetype)init {
    self = [super init];
    if (self) {
        _objPool = [NSMutableArray array];
    }
    return self;
}

-(void)pushNetWokingObj:(id)obj {
    [_objPool addObject:obj];
}

-(void)popNetWokingObj:(id)obj {
    [_objPool removeObject:obj];
}

@end
